package com.cskaoyan.controller.wxcontroller;

import com.cskaoyan.bean.pojo.User;
import com.cskaoyan.bean.vo.BaseRespVo;
import com.cskaoyan.bean.vo.RegionListVO;
import com.cskaoyan.bean.vo.wx.AddressListVO;
import com.cskaoyan.service.AddressService;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.subject.Subject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 区域列表接入接口
 *
 * @author: ckd
 */
@SuppressWarnings("all")
@RestController
@RequestMapping("wx/region")
public class RegionController {

    @Autowired
    AddressService addressService;

    @RequestMapping("list")
    public BaseRespVo regionList(int pid) {
        List<RegionListVO> regionListVOS=addressService.regionList(pid);
        return BaseRespVo.ok(regionListVOS,"成功");
    }
}
